Skip to content

Repair verified broken links and tighten link-checker accuracy (#845) - #1302

Merged
LukasWallrich merged 8 commits into
rebrand-doorsfrom
doors/link-checker-845
Nov 24, 2026
Merged

LukasWallrich merged 8 commits into
rebrand-doorsfrom
doors/link-checker-845

Conversation

@LukasWallrich

@LukasWallrich LukasWallrich commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

The weekly link-checker report (#845) had accumulated 89 actionable errors, 2 unregistered DOIs, 1 direct publisher URL, and 2 stale bot-blocked links—a mix of genuinely rotted links on hand-maintained pages, trailing-punctuation bugs in rendered cluster references, leaked Word hyperlink field switches in /disciplines/, and noisy false positives from bot-blocking and report-parsing bugs.

This PR repairs every verified broken link in hand-maintained pages, fixes the root template/parser causes without touching generated files, tightens the link-checker configuration and workflow, and lists the remaining dead upstream Google Sheet links for source maintenance.

Refs #845 — partial (#845 is the recurring weekly report; upstream Google Sheet cells and main-only content remain outside this PR). Note that the direct publisher URL in content/reversals/reversals.md:1989 (psycnet.apa.org/fulltext/2019-68134-001.pdf) and the dead mheducation.com.au / Rohrer_et_al_2015JEPG.pdf links were already repaired on rebrand-doors in #1054.

Hand-maintained page repairs (15 links across 10 files)

Every replacement DOI was verified against the DOI Handle API and Crossref/DataCite; every OSF and Wayback snapshot was checked to return 200 with the exact intended article/PDF (not parked or WAF-stub pages).

Page Original URL Replacement Verification
content/awards/awards.md jisc.ac.uk/news/all/jisc-announces-2023-community-champions Wayback 2025-09-22 Live URL returns 404/challenge; snapshot lists Dr Flavio Azevedo (2023 Jisc Community Champions)
content/awards/awards.md osc-galway.ie/competition/ Wayback 2022-11-27 Domain parked since 2023; last genuine Open Scholarship Prize capture
content/adopting/adopting.md journalofcognition.org/articles/10.5334/joc.72 https://doi.org/10.5334/joc.72 Canonical DOI (Brysbaert, 2019 power tutorial)
content/adopting/adopting.md zenodo.org/record/3593258#.X3J4W2hKgUE https://doi.org/10.5281/zenodo.3593258 Canonical DataCite DOI (Wiegers & van Gelder, 2019)
content/educators-corner/010-Neurodiversity/index.md adhdfoundation.org.uk/.../Takeda_Will-the-doctor-see-me-now_ADHD-Report.pdf Wayback 2026-09-19 Domain NXDOMAIN; snapshot verified as valid PDF
content/educators-corner/018-accessible-feedback-in-research/index.md eige.europa.eu/.../garcia_working_paper_5_academic_careers_gender_inequality.pdf Wayback 2026-10-15 Origin serves geolocation block with self-signed TLS cert to non-EU hosts; snapshot verified as valid PDF (note: may be temporary on EIGE)
content/lesson-plans/nd-lessons-plans.md & content/neurodiversity-lessonbank/_index.md apa.org/science/about/psa/2019/02/open-science Wayback 2021-06-03 404 on APA since July 2026; verified non-Incapsula capture (An introduction to open science)
content/pedagogies/003-CREP/index.md apa.org/ed/precollege/about/undergraduate-major Wayback 2022-01-20 404 on APA since Aug 2026; verified non-Incapsula capture (APA Guidelines for the Undergraduate Psychology Major)
content/pedagogies/001-Julia-Strand/index.md psych.unl.edu/mdodd/Psy498/BarghPrime.pdf https://doi.org/10.1037/0022-3514.71.2.230 Canonical DOI (Bargh, Chen, & Burrows, 1996)
content/OS-developing-world/OS-developing-world.md (3 links) http://osf.io/7ubk2 https://osf.io/7ubk2 Port 80 timed out; HTTPS returns 200
content/replication-hub/large-scale-replication-projects/index.md http://www.socialsciencesreplicationproject.com https://osf.io/pfdyw/ Domain NXDOMAIN; official SSRP OSF repository (Camerer et al., 2018)
content/replication-hub/large-scale-replication-projects/index.md https://reprosci.epfl.ch https://doi.org/10.7554/eLife.108403 Live app returning 500; canonical eLife Reviewed Preprint DOI (Lemaitre et al.)
content/reversals/reversals.md psych.colorado.edu/~jclab/pdfs/Correll%20(2008).pdf https://doi.org/10.1037/0022-3514.94.1.48 Canonical DOI (Correll, 2008)
content/reversals/reversals.md rips-irsp.com/article/10.5334/irsp.571/ https://doi.org/10.5334/irsp.571 Canonical DOI (Adelina & Feldman, 2021)
content/reversals/reversals.md publikationen.uni-tuebingen.de/xmlui/handle/10900/91253 https://doi.org/10.15496/publikation-32634 Canonical DataCite DOI (Ilchovska & Culbertson, 2019; repository host currently timing out)

Template & generator fixes (zero generated files edited)

  • Cluster fallback links (layouts/partials/clusters/cluster_section.html): exclude trailing sentence punctuation ([.,;:!?)\]]) when auto-linking non-DOI URLs, matching summary_entries.html and games/text.html. Fixes research-undergraduate. (404 in Link Checker Report #845) plus three other cluster URLs (psyarxiv.com/tcxaj/., muse.jhu.edu/article/513250., leidenmadtrics.nl/...journal?). Added hard regression check Add embedded wiki. #29 in scripts/check_seo_html.py.
  • Disciplines parser & repair map (scripts/disciplines_link_repairs.json, scripts/parse_disciplines_gdoc.py, scripts/parse_disciplines_to_json.py):
    • Strip leaked Microsoft Word HYPERLINK field switches (%22%20/o%20...%22%20/t%20%22_blank) in both parsers, fixing the malformed 10.1038/nrn.2016.167 DOI.
    • Added 11 verified /disciplines/ link repairs (royalsoced.org.uk → rse.org.uk, degruyter.com/.../opar → degruyterbrill.com/journal/key/opar/html, clarin.dk/clarindk/forside.jsp → info.clarin.dk, http://eprints.rclis.org/ → https://eprints.rclis.org/, openarchaeologydata.metajnl.com/.../joad.57/ → doi.org/10.5334/joad.57, and verified Wayback captures for retired/offline blog.f1000.com, mhdss.ac.uk ×2, opted.eu D7.6 PDF, openbioresources.metajnl.com, pubpsych.zpid.de).
    • Wired parse_disciplines_to_json.py to apply disciplines_link_repairs.json and Word field-switch cleanup during export (takes effect next time parse_disciplines_to_json.py is re-run and data/disciplines.json is committed).
  • Curated resources generator (content/resources/resource.py): strip leading/trailing whitespace from link_to_resource during wrangle_data() (4 rows in the sheet currently have leading spaces/newlines; takes effect on the next data-processing run).

Link-checker accuracy (.lychee.toml, .github/workflows/link-check.yaml)

(Takes effect for weekly runs once merged to the default branch.)

  • Exclude facebook.com (returns 400 to all automated requests) alongside linkedin.com/twitter.com/x.com, and anchor both facebook.com and x.com to host boundaries (://(?:[^/]*\.)?x\.com(?:/|$)) so unanchored x.com no longer silently skips dropbox.com, mapbox.com, vox.com, slatestarcodex.com, replicationindex.com, and hugoblox.com.
  • Exclude ^https://eocampaign1\.com/form/ (the POST-only newsletter signup action that legitimately returns 405 to HEAD/GET probes; /web-version links remain checked).
  • Extend the workflow's second-pass browser GET + Wayback verification from 403 to 403, 405, 409, and 412 (recovers De Gruyter, NIHR, Dimensions, Econ Journal Watch; sends oer.deepwebaccess.com to Wayback verification). 401 remains in Broken links so genuinely restricted public forms (e.g. Google Forms requiring sign-in) are never misreported as working.
  • Fix the timeout page-attribution bug (### Timeouts in ... headers were ignored, attributing all 22 timeouts to /welcome/) and guard bullet parsing to ## Errors / ## Timeouts sections so future lychee releases' ## Ignored per input sections are not parsed as broken links.
  • Align the DOI validator with .lychee.toml's exclude_path by skipping archived newsletter issues (^/newsletters/\d{4}-\d{2}/), resolving the historical /newsletters/2025-10/ (10.31234/osf.io/znbep) false alarm.

Remaining upstream Google Sheet links (for source maintainers)

Generated files under content/curated_resources/, content/glossary/, and data/disciplines.json were not hand-edited. The following genuinely dead or misconfigured upstream sheet entries remain to be updated at source:

  • Curated Resources sheet (gid=1924034107):
    • https://www.dpjedi.org/ and https://www.dpjedi.org/resources → drop www. (https://dpjedi.org/, https://dpjedi.org/resources return 200)
    • https://www.preclinicaltrials.eu/ → drop www. (https://preclinicaltrials.eu/ returns 200)
    • https://www.energielabzuidoost.nl/just-prepare/ → 404 (project page removed on energielabzuidoost.nl)
    • https://www.phil.vt.edu/dmayo/personal_website/Schmidt_Hunter_Eight_Common_But_False_Objections.pdf → SSL mismatch / dead host (replace with Wayback or DOI 10.1037/1082-989X.1.2.115)
    • https://stemdust.com/posts/deletion-erasure-and-what-the-marker-test-can-actually-prove → connection timeout
  • Glossary sheets / Doc:
    • http://www.replicationmarkets.com/ → https://replicationmarkets.org/ (200 OK)
    • https://www.equator-network.org/about-us/what-is-a-reporting-guideline/ → 404 (site restructured)
    • http://legacy.earlham.edu/~peters/fos/overview.htm → connection timeout (replace with Wayback capture)
    • https://www.go-fair.org/fair-principles/ → redirects to https://www.gofair.foundation/fair-principles
  • Disciplines sheet (1mSlduu86_nE1sY1gXobw3Pp1vI73B_0iHBsJqjtsJU4):
    • Re-run python3 scripts/parse_disciplines_to_json.py (or update the 12 cells matching scripts/disciplines_link_repairs.json + strip the Word field switch on 10.1038/nrn.2016.167) to propagate the repairs into data/disciplines.json.

Verification

  • hugo --gc --minify --cleanDestinationDir built cleanly (3,516 pages).
  • python3 scripts/rebrand/check_source_rules.py --base origin/rebrand-doors: passed (0 template/menu violations, 0 generated paths changed).
  • python3 scripts/check_seo_html.py <dir>: all 29 hard checks passed, including new check Add embedded wiki. #29.
  • Unit tests passed: test_parse_disciplines_gdoc.py (13/13), test_check_seo_html.py (52/52), test_resource_entities.py (6/6), test_rebrand_checks.py (61/61).
  • Verified all rendered href values in built HTML and captured verification screenshots of key repaired pages:

awards-desktop-1
replication-hub-large-scale-replication-projects-desktop-1
clusters-cluster-1-desktop-1

Created with Gemini 4 Neon in Antigravity (pre-PR audit by Claude Opus 5.5).


Summary by cubic

Repairs the verified broken links from the weekly link-checker report (#845) in hand-maintained pages, swapping dead URLs for canonical DOIs and verified Wayback captures, and fixes the parser and template bugs behind them. Also tightens the link-checker workflow to cut false positives and replaces the image-only PR check with an advisory content-rules check. Remaining dead upstream Google Sheet links are documented for source maintainers.

Link-checker workflow

  • Bot-blocked and method-restricted responses (403/405/409/412) get a second-pass browser GET and Wayback verification; 401 stays in Broken links so auth-gated forms are never reported as recovered.
  • Zenodo URLs are verified against the Zenodo REST API via a new helper module, promoting dead records and files to Broken links.
  • Excludes facebook.com, anchors the x.com exclusion, and excludes Slack invite/workspace domains and the POST-only newsletter form endpoint.
  • Fixes the timeout page-attribution bug and restricts bullet parsing to Errors/Timeouts sections.
  • Aligns the DOI validator with .lychee.toml's exclude_path for archived newsletter pages.

Root-cause fixes

  • Cluster fallback links no longer swallow trailing sentence punctuation or unmatched closers, with a new hard regression check.
  • Disciplines parsers share one repair helper that strips leaked Word HYPERLINK field switches and applies verified link repairs on export.
  • The curated resources generator strips whitespace from link_to_resource values.
  • Replaces the image-only PR check with check_content_rules.py, which advisories on newly added publisher URLs with embedded DOIs in hand-maintained content alongside the existing WebP warning.

Refs #845 — partial (the recurring weekly report; upstream Google Sheet cells and main-only content remain outside this PR).

Written for commit 5db624c. Summary will update on new commits.

View guided diff Turn on auto-fix

@LukasWallrich
LukasWallrich requested a review from a team as a code owner November 24, 2026 10:36
@github-actions

Copy link
Copy Markdown
Contributor

👍 All image files/references (if any) are in webp format, in line with our policy.

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

📝 Spell Check Results

Found 1 potential spelling issue(s) when checking 38 changed file(s):

📄 content/reversals/reversals.md

Line Issue
2140 acn ==> can, acne

ℹ️ How to address these issues:

  1. Fix the typo: If it's a genuine typo, please correct it.
  2. Add to whitelist: If it's a valid word (e.g., a name, technical term), add it to .codespell-ignore.txt
  3. False positive: If this is a false positive, please report it in the PR comments.

🤖 This check was performed by codespell

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 22 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread .lychee.toml Resolved
Comment thread .github/workflows/link-check.yaml Resolved
Comment thread scripts/check_seo_html.py Resolved
Comment thread scripts/parse_disciplines_to_json.py Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 9 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread scripts/link_check_helpers.py Resolved
Comment thread scripts/link_check_helpers.py Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 5 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread scripts/check_content_rules.py Resolved
Comment thread scripts/check_content_rules.py Resolved
Comment thread scripts/check_content_rules.py Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread .github/workflows/README.md Resolved
@github-actions

Copy link
Copy Markdown
Contributor

👍 All content rules passed (WebP images/references and canonical doi.org links).

@LukasWallrich
LukasWallrich merged commit 92221b0 into rebrand-doors Nov 24, 2026
9 of 10 checks passed
@LukasWallrich
LukasWallrich deleted the doors/link-checker-845 branch November 24, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant